package com.zxy.supplier_system.server.repository

import com.zxy.supplier_system.server.entity.DirectSaleOrderItem
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.JpaRepository

@Suppress("FunctionName")
interface DirectSaleOrderItemRepository:JpaRepository<DirectSaleOrderItem,DirectSaleOrderItem.UnionId> {

    fun findAllByOrder_IdOrderBySequenceAsc(directSaleOrder_id: Int, pageable: Pageable):Page<DirectSaleOrderItem>

    fun existsByOrder_IdAndGoods_Id(directSaleOrder_id: Int, goods_id: Int):Boolean

    fun existsByOrder_IdAndGoods_Barcode(directSaleOrder_id: Int, goods_barcode: String):Boolean;

}
